package rt

import "kumachan/interpreter/lang/common/source"


type Code struct {
	InstTree   [] Instruction
	Position   [] source.Position
	ExtBranch  [] ExternalBranchMapping
	ExtUpdate  [] ExternalUpdateIndexes
	Arguments  [] ShortIndex
	CtxSize    LocalSize
	Lambdas    [] *FunctionEntity
	Static     [] Value
	GenStatic  *GeneratedStaticData
}
type GeneratedStaticData struct {
	DispatchTables  [] *DispatchTable
	TransformPaths  [] InterfaceTransformPath
}
func (code *Code) ArgsIndex1Vector() ([] ShortIndex) {
	return code.Arguments
}
func (code *Code) ContextSize() LocalSize {
	return code.CtxSize
}
func (code *Code) Instruction(i LocalAddr) Instruction {
	return code.InstTree[i]
}
func (code *Code) StaticValue(s LocalAddr) Value {
	return code.Static[s]
}
func (code *Code) GetBranchAddr(i ExternalCodeEntityIndex, key BranchKey) LocalAddr {
	return code.ExtBranch[i].ChooseBranch(key)
}
func (code *Code) GetUpdateIndexes(i ExternalCodeEntityIndex) ([] ShortIndex) {
	return code.ExtUpdate[i]
}
func (code *Code) Lambda(index LocalAddr) *FunctionEntity {
	return code.Lambdas[index]
}
func (code *Code) DispatchTable(index LocalAddr) *DispatchTable {
	return code.GenStatic.DispatchTables[index]
}
func (code *Code) InterfaceTransformPath(index LocalAddr) InterfaceTransformPath {
	return code.GenStatic.TransformPaths[index]
}


